package com.ray.depot.service;

import com.ray.depot.table.entity.InOutRecord;
import com.ray.depot.table.vo.RecordVo;
import com.zjhc.flyhong.common.function.operator.LoginUser;
import com.zjhc.flyhong.common.function.operator.PageDto;
import com.zjhc.flyhong.common.web.Result;

public interface InOutRecordService {

	/**
	 * 新增
	 * @param params
	 * @param user
	 * @return
	 */
	Result<Object> addInOutRecord(InOutRecord params, LoginUser user);
	
    /**
     * 查询
     * @param id
     * @param user
     * @return
     */
	InOutRecord queryInOutRecord(String id, LoginUser user);
	
    /**
     * 修改
     * @param params
     * @param user
     * @return
     */
	Result<Object> updateInOutRecord(InOutRecord params, LoginUser user);
	
    /**
     * 删除
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteInOutRecord(String id, LoginUser user);
	
   /**
    * 查询
    * @param params
    * @param page
    * @param user
    * @return
    */
	PageDto<InOutRecord> queryInOutRecord(InOutRecord params, PageDto<InOutRecord> page, LoginUser user);
    /**
     * 创建收货单
     * @param record
     * @param user
     * @return
     */
    Result<Object> saveInRecord(RecordVo record,Boolean isDaft, LoginUser user);
   
    /**
     * 修改收货单
     * @param record
     * @param user
     * @return
     */
     Result<Object> editInRecord(RecordVo record, LoginUser user);
     /**
      * 仓库入库操作
      * @param id
      * @param user
      * @return
      */
 	Result<Object> storeIn(String id, LoginUser user);
 
    /**
     * 删除入库数据
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteInRecord(String id, LoginUser user);
    /**
     * 保存发货单
     * @param record
     * @param isDaft
     * @param user
     * @return
     */
    Result<Object> saveOutRecord(RecordVo record, Boolean isDaft, LoginUser user) ;
    /**
     * 修改发货单
     * @param record
     * @param user
     * @return
     */
     Result<Object> editOutRecord(RecordVo record, LoginUser user);
     /**
      * 仓库出库操作 
      * @param id
      * @param userservice
      * @return
      */
 	Result<Object> storeOut(String id, LoginUser user);
 	
    /**
     * 删除出库数据
     * @param id
     * @param user
     * @return
     */
	Result<Object> deleteOutRecord(String id, LoginUser user);
    /**
     * 提交审核
     * @param inOutNo
     * @param deployId
     * @param defId
     * @param actKey
     * @param user
     * @return
     */
	Result<Object> applyRecord(String inOutNo,String userids, String deployId, String defId, String actKey, LoginUser user);
	/**
	 * 通过出入库单号查询
	 * @param inOutNo
	 * @param user
	 * @return
	 */
   InOutRecord queryInOutRecordByInOutNo(String inOutNo, LoginUser user);
   
	/**
	 * 审批不同意
	 * @param inOutNo
	 */
	void applyFail(String inOutNo);
	
	/**
	 * 审批失败
	 * @param inOutNo
	 */
	void applySuccess(String inOutNo);
	/**
	 * 审批中状态
	 * @param inOutNo
	 */
	void applyIng(String inOutNo);
	/**
	 * 审批中状态
	 * @param inOutNo
	 */
	void applyCancel(String inOutNo);
	
	
	
    /**
     * 生成入库单并且入库
     * @param record
     * @param user
     * @return
     */
	RecordVo saveInRecordAndDoIn(RecordVo record, LoginUser user);
	 /**
     * 创建收货单
     * @param record
     * @param user
     * @return
     */
    RecordVo saveInRecord(RecordVo record,String status, LoginUser user);
   
    /**
     * 生成出库单并且出库
     * @param record
     * @param user
     * @return
     */
	RecordVo saveOutRecordAndDoOut(RecordVo record, LoginUser user);
    /**
     * 生成出库单
     * @param record
     * @param status
     * @param user
     * @return
     */
	RecordVo saveOutRecord(RecordVo record, String status, LoginUser user);
	
   
}
